[PATCH] shell: Rearrange the teardown order
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>
Wed, 28 May 2025 13:36:20 +0000 (13:36 +0000)
committerAurélien COUDERC <coucouf@debian.org>
Mon, 21 Jul 2025 16:21:10 +0000 (18:21 +0200)
commit2aae320768364b15c2a7778418049cdfe9dc91f7
treebe39cc4f4c496f75088f7c7d3e23fd0e3bc8ddf5
parent38a1a29eade4025ee664c4339fff962ca6a04d73
[PATCH] shell: Rearrange the teardown order

At the moment, the ShellCorona is destroyed after the QApplication object.
Destroying something after the application object can lead to
unexpected results because most of the code is written with an assumption
that the app object and the associated objects, e.g. the qpa, are still
valid when the cleanup code runs.

This change puts the ShellCorona on the stack so the destruction order
looks as follows:

- destroy ShellCorona
- destroy QApplication

CCBUG: 487660

(cherry picked from commit e2326d7f9e752eb18411ef4c0bcd53b8f34e02c6)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Gbp-Pq: Name upstream_88911e82_shell-Rearrange-the-teardown-order.patch
shell/main.cpp